<template>
	<div class="middle_all" style="">
		<ul class="middle_Basic_information_middle">
			<li>
				<span class="middle_Basic_information_middle_left">报告创建时间</span>
				<span class="middle_Basic_information_middle_right">
					<p>{{data.queryTime}} </p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">企业名称</span>
				<span class="middle_Basic_information_middle_right copybox">
					<p>{{data.companyName}}
						<!-- <em style="color: blue;">复制</em> -->
					</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">当前法人姓名</span>
				<span class="middle_Basic_information_middle_right copybox">
					<p>{{da(data,['enterprise','basic','operName'] )}}
						<!-- <em style="color: blue;">复制 </em> -->
					</p>
				</span>
			</li>

			<li>
				<span class="middle_Basic_information_middle_left">法人年龄（岁）</span>
				<span class="middle_Basic_information_middle_right">
					<p>{{da(data,['enterpriseInfoPrompt','applierAge'] )}}</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">法人占股比例</span><span
					class="middle_Basic_information_middle_right">
					<p>
					<p>{{ cgbl()}}</p>
					</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">成立日期</span>
				<span class="middle_Basic_information_middle_right">
					<p>{{da(data,['enterprise','basic','startDate'] )}}</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">统一信用代码</span>
				<span class="middle_Basic_information_middle_right copy_sh">
					<p>{{da(data,['baseinfoVo','tyshxydm'] )}}
						<!-- <em style="color: blue;">复制</em> -->
					</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">行业分类</span>
				<span class="middle_Basic_information_middle_right">
					<p>
						{{da(data,['baseinfoVo','mlmc'] )}}
					</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">注册类型</span>
				<span class="middle_Basic_information_middle_right">
					<p>
						{{da(data,['baseinfoVo','djzclx']) }}
					</p>
				</span>
			</li>
			<li>
				<span class="middle_Basic_information_middle_left">注册区域</span>
				<span class="middle_Basic_information_middle_right">
					<p style="margin-right: -1rem;">
						{{da(data,['baseinfoVo','zcdz']) }}
					</p>
				</span>
			</li>
		</ul>

		<li class="new_li">
			<span class="middle_Basic_information_middle_left" style="font-weight: bold;">
				基本信息
			</span>
		</li>
		<div class="middle_Basic_information_middle_second">
			<li>
				<p>行业名称</p>
				<span>{{ da(data,['enterprise','basic','industryName']) }}</span>
			</li>
			<!-- 			<li>
				<p>地址</p>
				<span>{{ da(data,['enterprise','basic','address']) }}</span>
			</li> -->
			<li>
				<p>细分行业</p>
				<span>{{ da(data,['enterprise','basic','domains']) }}</span>
			</li>
			<li>
				<p>企业类型</p>
				<span>{{ da(data,['enterprise','basic','econKind']) }}</span>
			</li>
			<li>
				<p>经营截止日期</p>
				<span>{{ da(data,['enterprise','basic','termEnd']) }}</span>
			</li>
			<li>
				<p>检查日期</p>
				<span>{{ da(data,['enterprise','basic','checkDate']) }}</span>
			</li>
			<li>
				<p>注册时间</p>
				<span>{{ da(data,['enterprise','basic','termStart']) }}</span>
			</li>
			<li>
				<p>省份</p>
				<span>{{ da(data,['enterprise','basic','province']) }}</span>
			</li>
			<li>
				<p>注册资本</p>
				<span>{{ da(data,['enterprise','basic','registCapi']) }}</span>
			</li>
			<!-- 			<li>
				<p>范围</p>
				<span>{{ da(data,['enterprise','basic','scope']) }}</span>
			</li> -->
			<li>
				<p>操作名称</p>
				<span>{{ da(data,['enterprise','basic','operName']) }}</span>
			</li>
		</div>
		
		
		<li class="new_li">
			<span class="middle_Basic_information_middle_left" style="font-weight: bold;">
				股东明细
			</span>
		</li>
		<div class="tbdiv">
			<table class="middle_Basic_information_tb" style="width: 100%;">
				<thead>
					<tr>
						<th style="width: 30%;">股东名称</th>
						<th style="width: 30%;">参股数额</th>
						<th style="width: 30%;">参股比例</th>
					</tr>
				</thead>
				<tbody>
					<tr v-if="data.enterprise && data.enterprise.partners" v-for="i_ of data.enterprise.partners"
						class="">
						<td>{{i_.name}}</td>
						<td>{{i_.totalRealCapi}}</td>
						<td>{{ zeroTwo(i_.stockRate * 100) + '%' }}</td>
					</tr>
				</tbody>
			</table>
		</div> 
		
		<li class="new_li">
			<span class="middle_Basic_information_middle_left" style="font-weight: bold;">
				法人/股东变更
			</span>
		</li>
		<div class="tbdiv">
			<table class="middle_Basic_information_tb" style="width: 100%;  table-layout: fixed;">
				<thead>
					<tr>
						<th style="width: 20%;">变更类型</th>
						<th style="width: 15%;">变更时间</th>
						<th style="width: 35%;">变更前</th>
						<th style="width: 35%;">变更后</th>
					</tr>
				</thead>
				<tbody>
					<template v-if="data.enterprise && data.enterprise.changerecords"
						v-for="i_ of data.enterprise.changerecords">
						<tr v-if="changeFiltr(i_.changeItem)">
							<td>{{i_.changeItem}}</td>
							<td>{{i_.changeDate}}</td>
							<td>
								{{i_.beforeContent}}
							</td>
							<td>
								{{i_.afterContent}}
							</td>
						</tr>
					</template>
					<tr class="old">
						<td colspan="4">
							暂无
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<li class="new_li">
			<span class="middle_Basic_information_middle_left" style="font-weight: bold;">
				企业著作权信息
			</span>
		</li>
		<div class="tbdiv">
			<table class="middle_Basic_information_tb" style="width: 100%;">
				<thead>
					<tr>
						<th style="width: 20%;">著作注册号</th>
						<th style="width: 20%;">著作名称</th>
						<th style="width: 20%;">类型名称 完成时间</th>
						<th style="width: 20%;">批准时间 最后更新时间</th>
						<th style="width: 20%;">登记批准时间</th>
					</tr>
				</thead>
				<tbody>
					<tr v-if="data.copyright && data.copyright.length > 0" v-for="(i_, i) of data.copyright"
						:class="i%2==0?'':'old'">
						<td>
							{{i_.number}}
						</td>
						<td>
							{{i_.name}}
						</td>
						<td>
							{{i_.typeName}} {{i_.successDate}}
						</td>
						<td>
							{{i_.approvalDate}} {{i_.lastUpdatedTime}}
						</td>
						<td>
							{{i_.firstDate}}
						</td>
					</tr>
					<tr class="old">
						<td colspan="5">
							暂无
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<!-- 
		<li class="new_li">
			<span class="middle_Basic_information_middle_left" style="font-weight: bold;">
				企业软件著作权信息
			</span>
		</li>
		<div class="tbdiv">
			<table class="middle_Basic_information_tb" style="width: 100%;">
				<thead>
					<tr>
						<th style="width: 20%;">软著注册号</th>
						<th style="width: 20%;">软著名称</th>
						<th style="width: 20%;">类型名称 完成时间</th>
						<th style="width: 20%;">批准时间 最后更新时间</th>
						<th style="width: 20%;">登记批准时间</th>
					</tr>
				</thead>
				<tbody>
					<tr v-if="data.copyrightSoft && data.copyrightSoft.length > 0" v-for="(i_, i) of data.copyrightSoft"
						:class="i%2==0?'':'old'">
						<td>
							{{i_.number}}
						</td>
						<td>
							{{i_.name}}
						</td>
						<td>
							{{i_.typeName}} {{i_.successDate}}
						</td>
						<td>
							{{i_.approvalDate}} {{i_.lastUpdatedTime}}
						</td>
						<td>
							{{i_.firstDate}}
						</td>
					</tr>
					<tr class="old">
						<td colspan="5">
							暂无
						</td>
					</tr>
				</tbody>
			</table>
		</div>-->

	</div>
</template>

<script>
	export default {
		name: "com-jcxx",
		props: {
			data: {
				required: true,
				type: Object
			}
		},
		data() {
			return {

			};
		},
		created() {
			console.log('jcxx', this.data)
		},
		methods: {
			da(data, keys) {
				let i = 0
				while (i < keys.length) {
					if (data[keys[i]] == undefined) {
						return ''
					} else {
						data = data[keys[i]]
						i++
					}
				}
				return data == '' ? '' : data
			},
			changeFiltr(i) {
				if (i) {
					return i.includes('法人') || i.includes('股东')
				} else {
					return false
				}
			},
			cgbl() {
				let num = this.da(this.data, ['enterpriseInfoPrompt', 'applierStockRate'])
				num = parseFloat(num)
				return this.zeroTwo(num * 100) + '%'
			}
		}
	}
</script>

<style lang="less">
	@import url('@/static/scss/app.76424ad10ca5074daf35c206f425a749.css');
</style>